<template>
  <div>
    <div class="card-header">
      <span>{{ title }}</span>
      <svg
        t="1644305145864"
        class="icon"
        viewBox="0 0 1024 1024"
        version="1.1"
        xmlns="http://www.w3.org/2000/svg"
        p-id="7186"
        width="16"
        height="16"
      >
        <path
          d="M512 1024c282.771 0 512-229.23 512-512s-229.23-512-512-512-512 229.23-512 512 229.23 512 512 512zM432 256c0-44.183 35.817-80 80-80s80 35.817 80 80v31.999c0 44.183-35.817 80-80 80s-80-35.817-80-80v-31.999zM431.999 512c0-44.183 35.817-80 80-80s80 35.817 80 80v256c0 44.183-35.817 80-80 80s-80-35.817-80-80v-256z"
          p-id="7187"
          fill="#bfbfbf"
        ></path>
      </svg>
    </div>
    <div class="card-number">{{ number }}</div>
    <div class="card-chart">
      <div class="cur">
        <slot name="chart"></slot>
      </div>
    </div>
    <div class="card-footer">
      <div class="cur">
        <slot name="footer"></slot>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "Detail",
  props: ["title", "number"],
};
</script>

<style scoped lang="less">
.card-header {
  color: #999;
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
}
.card-number {
  font-size: 25px;
  margin-bottom: 5px;
}
.card-chart {
  height: 50px;
}
.card-footer {
  border-top: 1px solid #eee;
}
.cur {
  width: 100%;
  height: 100%;
  margin-top: 10px;
  span {
    margin: 5px;
  }
}
</style>